/**
 * 计算工具
 */

#ifndef FLIGHT_TOOL
#define FLIGHT_TOOL

#include <geometry_msgs/PoseStamped.h>
#include <geographic_msgs/GeoPoseStamped.h>

class FlightTool
{
public:
    static FlightTool *GetInstance()
    {
        if (instance == nullptr)
        {
            instance = new FlightTool();
        }
        return instance;
    }

    // 获得三维点坐标下的两个点间距离
    float GetDistance(const geometry_msgs::PoseStamped &p1, const geometry_msgs::PoseStamped &p2);
    float GetDistance(const geographic_msgs::GeoPoseStamped &p1, const geographic_msgs::GeoPoseStamped &p2);

private:
    FlightTool(){};
    static FlightTool *instance;
};

#endif